package com.me.customerdemo.service.impl;

import com.me.customerdemo.dao.StorageMapper;
import com.me.customerdemo.pojo.Storage;
import com.me.customerdemo.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StorageServerImpl implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Override
    public List<Storage> selectAll() {
        return storageMapper.selectAll();
    }

    @Override
    public boolean updateById(Storage storage) {
        return storageMapper.updateById(storage)>0? true:false;
    }

    @Override
    public boolean deleteById(int id) {
        return storageMapper.deleteById(id)>0?true:false;
    }

    @Override
    public boolean apply(Storage storage) {
        return storageMapper.apply(storage)>0?true:false;
    }
}
